what happens when you run a query